﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using log4net;
using log4net.Config;
using System.Reflection;

namespace COM.Logging
{
    public class Logger
    {

        //private static ILog _log = LogManager.GetLogger(typeof(Logger));

        public static ILog Log
        {
            get
            {
                XmlConfigurator.Configure(
                    new FileInfo((new System.Uri(Assembly.GetExecutingAssembly().CodeBase)).AbsolutePath
                        .Replace("Common.DLL", "Log4Net.config")
                        .Replace("%20", " ")
                        .Replace("/", "\\")));
                return LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
            }
            //set { _log = value; }
        }
    }
}
